Conversation
|
Thanks. One way to test it without rebuilding everything would be setting Looking at the upstream diff, at minimum, we can probably remove |
Thanks for the tip! I'm currently running my system with I trialed removing the SUID wrapper, but it broke |
|
Glancing over the changes and experimenting, it seems like the socket-activation part happens automatically via systemd. Things were broken for me because of Regardless, it seems that there are several packages that depend on the wrapper. I'm unsure what should be changed if the wrapper is dropped (apologies, I am not very familiar with polkit). Output of
|
|
After some more experimentation, I can confidently say that I'm a bit out of my league with what is broken here. It would be great if someone with better hardware could do a proper build to test. |
|
Update: I was able to compile Remaining issues:
|
|
The socket can be autostarted with
|
Thanks! That works perfectly.
Thanks, I assumed so after I was able to get hyprpolkitagent working with an updated I'm going to go ahead and update this PR to remove the SUID wrapper. Still unsure what to do about the packages with a hard dependency on the wrapper 😕. |
|
For those wanting to test this PR without rebuilding the universe, I'm currently using the following configuration in my flake: security.polkit.package = inputs.nixpkgs-473068.legacyPackages.${pkgs.stdenv.hostPlatform.system}.polkit;
security.wrappers.polkit-agent-helper-1.enable = lib.mkForce false;
systemd.sockets."polkit-agent-helper".wantedBy = [ "sockets.target" ]; |
Polkit v127 no longer requires a SUID `polkit-agent-helper-1` and instead recommends using a socket-activated `polkit-agent-helper` service[1]. [1] <polkit-org/polkit#501>
|
Changed the target branch from |
I think the ideal solution would be to modify such packages to replace the wrapper with the agent's store path. Alternatively, we could keep the wrapper but remove its suid attribute like so: Although I am not sure if this will work across all packages, or break something else. |
LordGrimmauld
left a comment
There was a problem hiding this comment.
I had experimented with suid-less systems recently, and also picked the polkit patch enabling the socket activated agent helper. All that was needed was adding the socket to sockets.target, and that is being done here. This does look pretty good at a glance. I do plan on adding a suid-less nixos test testing run0, polkit and pam afteri get around to adding account-utils as an option. I'll do a more detailed review later today.
|
I updated #453557, which has a suid-less pam/login test. I can try picking this PR onto the tree there to also check polkit+run0 with that, though i am currently building systemd 259 things first. |
LordGrimmauld
left a comment
There was a problem hiding this comment.
https://git.grimmauld.de/Grimmauld/grimm-musl/commit/064dd8afcfc41c2083c0b8842b60e99bf6282fb5
#473403, #453557, #472008, #473068 on musl nixos and current staging, with a couple other fixes
Seems to work, polkit agent requests do work at least for run0. Socket is up, and it even works on musl.
|
fwiw i did build a couple nixos tests which do polkit things ( |
|
polkit authentication dialog failed to authenticate on my system after this was merged into master I have howdy on the system workaround with |
|
Reposting from #259641:
|
Fixes: #472582
https://github.com/polkit-org/polkit/blob/main/NEWS.md#polkit-127
Still fairly new to nixpkgs, so let me know if I'm doing anything incorrectly! Not sure what the best way to test this is, still working on rebuilding my system with this change (compilation is brutal).
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.